import request from '@/utils/request'

// 查询销毁单列表
export function listArchiveBorrow(query) {
    query.forEach(function(v,i) {
        console.log("44444",i,v)
    })
  return request({
    url: '/archive/destroyKu/destroyList',
    method: 'post',
    //params: query,
      data: query,
      headers: {
          'Content-Type': 'multipart/form-data'
      }
  })
}


//下载销毁清册
export function downloadDestructionInventory(data) {
    return request({
        url: '/archive/destroyKu/downloadDestroyList/'+data.destroyId,
        method: 'get',
        responseType: 'arraybuffer',
    })
}

//下载监销单
export function downloadMonitoringForm(data) {
    return request({
        url: '/archive/destroyKu/downloadDestroyFile/'+data.destroyId,
        method: 'get',
        responseType: 'arraybuffer',
    })
}

//上传监销单
export function uploadMonitoringForm(data) {
    return request({
        url: '/archive/destroyKu/upload',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

//删除监销单
export function deleteMonitoringForm(data) {
    return request({
        url: '/archive/destroyKu/clearFilePath',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 查询archiveBorrow详细
export function getArchiveBorrow(borrowId) {
  return request({
    url: '/archive/archiveBorrow/' + borrowId,
    method: 'get'
  })
}



// 删除archiveBorrow
export function delArchiveBorrow(borrowId) {
  return request({
    url: '/archive/archiveBorrow/' + borrowId,
    method: 'delete'
  })
}


//获取人员树接口
export function deptUserTree(query) {
  return request({
    url: '/system/user/deptUserTreeNoDateScope',
    method: 'GET',
    params: query
  })
}



export function cancelProcess(data) {
  return request({
    url: '/archive/archiveBorrow/handleCancelProcess',
    method: 'put',
    data: data
  })
}







export function minusOne(data) {
  return request({
    url: '/archive/archiveBorrow/minusOne/'+data,
    method: 'post'
  })
}

export function minusOnePrint(data) {
  return request({
    url: '/archive/archiveBorrow/minusOnePrint/'+data,
    method: 'post'
  })
}


